<?php if ( !defined('BASEPATH')) exit('No direct script access allowed');

class Customer_locations extends CI_Controller {

	public function __construct(){
		parent::__construct();
		$this->load->model('wus');
		$this->load->model($this->session->userdata('formodel'));
		$this->load->library('variable');
		$this->load->library('PHPexcel');

	}

	public function index(){

		$this->load->view('layouts/header',$this->variable->load_data($this->session->userdata('title')));
	  $this->load->view($this->session->userdata('formain'),array(
		'zone1' 	=> $this->customer_locations_model->getzoning(),
		'ranges'	=> $this->customer_locations_model->getRanges()
	  	));
	  $this->load->view('layouts/footer');
	}

	public function get_locations(){
		echo json_encode($this->customer_locations_model->get_locations($this->input->post('areas')));
	}



}